package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.ApprovalStatusEnum;
import com.chenfan.mcn.enums.PaybackStatusEnum;
import com.chenfan.mcn.model.IncomeContract;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author tangwei
 * Date:     2021/2/2 10:05
 * Description: 执行单关联收入合同
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ExcutionOrderContractVO extends IncomeContract implements Serializable {

    private static final long serialVersionUID = -4945075226477350757L;

    /**
     * 所属部门
     */
    private String departmentName;

    /**
     * 流程节点id
     */
    private Long flowId;

    /**
     * 流程节点名称
     */
    private String flowStatusName;

    /**
     * 单据状态
     */
    private String approvalStatusName;

    public String getApprovalStatusName() {
        if (Objects.nonNull(getApprovalStatus())) {
            return ApprovalStatusEnum.getStatusName(getApprovalStatus());
        }
        return null;
    }

    /**
     * 回款状态名称
     */
    public String payBackStatusName;

    public String getPayBackStatusName() {
        if (Objects.nonNull(getPayBackStatus())) {
            return PaybackStatusEnum.getStatusName(getPayBackStatus());
        }
        return null;
    }

    /**
     * 合作品牌
     */
    private String cooperateBrandName;
}